import 'package:FlutterDemo/widget/scrollviews/helpers/helper_singlechildscrollview.dart';
import 'package:flutter/material.dart';

/*
 *当遇到内容较多时，需要滚动组件进行展示，SingleChildScrollView 是一个只能
包含单个组件的滚动组件，如果内容较多，建议使用ListView 等，因为
SingleChildScrollView 没有“懒加载”模式，性能不如ListView。
*
* 类似Android中的ScrollView
 */
class SampleSingleChildScrollViewWidget extends StatefulWidget {
  const SampleSingleChildScrollViewWidget({Key? key}) : super(key: key);

  @override
  _SampleSingleChildScrollViewWidgetState createState() =>
      _SampleSingleChildScrollViewWidgetState();
}

class _SampleSingleChildScrollViewWidgetState
    extends State<SampleSingleChildScrollViewWidget> {
  @override
  Widget build(BuildContext context) {
    // return buildSampleSingleChildScrollView();
    // return buildSampleHorizontalSingleChildScrollView();
    return buildSampleHorizontalSingleChildScrollView2();
  }
}
